package com.zx.notification.common.dao;

import com.zx.notification.common.model.NotificationPushTasks;
import com.zx.notification.common.vo.NotificationPushTasksVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface NotificationPushTasksMapper {
    int deleteByPrimaryKey(@Param("id") String id);

    int insert(NotificationPushTasks row);

    int insertSelective(NotificationPushTasks row);

    NotificationPushTasks selectByPrimaryKey(@Param("id") String id);

    int updateByPrimaryKeySelective(NotificationPushTasks row);

    int updateByPrimaryKey(NotificationPushTasks row);

    Long getNotificationPushTasksListCount(@Param("notificationId") String notificationId,
                                           @Param("channelType") String channelType,
                                           @Param("mqType") String mqType,
                                           @Param("status") String status,
                                           @Param("createTimeStart") LocalDateTime createTimeStart,
                                           @Param("createTimeEnd") LocalDateTime createTimeEnd);

    List<NotificationPushTasksVO> getNotificationPushTasksListByPage(@Param("notificationId") String notificationId,
                                                                     @Param("channelType") String channelType,
                                                                     @Param("mqType") String mqType,
                                                                     @Param("status") String status,
                                                                     @Param("createTimeStart") LocalDateTime createTimeStart,
                                                                     @Param("createTimeEnd") LocalDateTime createTimeEnd,
                                                                     @Param("pageNum") Long pageNum,
                                                                     @Param("pageSize") Long pageSize);

    void batchInsert(@Param("list") List<NotificationPushTasks> list);

    List<NotificationPushTasks> selectByNotificationId(@Param("notificationId") String notificationId);
}